<?php


namespace EleMe\OpenApi\Test;


use AlibabaCloud\Tea\Model;
use EleMe\OpenApi\Kernel\Factory;

class BaseAuthClientTest extends \PHPUnit\Framework\TestCase
{
    public function testGetToken(){
        $account = new TestAccount();
        Factory::setOptions($account->getTestAccount());
        $result = Factory::baseAuth()-> baseAuth() -> getToken("11233434");
    }
     public function testSign(){
            $config = new Config();
            $config ->appId = '3144771946312581413';
            $config ->merchantId = '4661595';
            $kernel = new EasySDKKernel($config);

            $systemParams = [
                "app_id" => $kernel->getConfig("appId"),
                "merchant_id" => $kernel->getConfig("merchantId"),
                "timestamp" => "1637206248711",
                "grant_type" => "authorization_code",
                "code" => "5XBuovegaW7LEDxcJe6630"
            ];
            $bizParams = [];
            $textParams = [

            ];
            $conent = $kernel->sign($systemParams,$textParams,$bizParams,"ae47e20c-2791-4d71-9458-e4cec286a97a");
        }
}